3.3.87 \(\int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx\) [287]

3.3.87.1 Optimal result
3.3.87.2 Mathematica [A] (verified)
3.3.87.3 Rubi [A] (verified)
3.3.87.4 Maple [A] (verified)
3.3.87.5 Fricas [A] (verification not implemented)
3.3.87.6 Sympy [F]
3.3.87.7 Maxima [A] (verification not implemented)
3.3.87.8 Giac [B] (verification not implemented)
3.3.87.9 Mupad [B] (verification not implemented)

3.3.87.1 Optimal result

Integrand size = 21, antiderivative size = 170 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\log (\cos (c+d x))}{a d}-\frac {\left (a^2-b^2\right )^3 \log (a+b \sec (c+d x))}{a b^6 d}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \sec (c+d x)}{b^5 d}-\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 b^4 d}+\frac {\left (a^2-3 b^2\right ) \sec ^3(c+d x)}{3 b^3 d}-\frac {a \sec ^4(c+d x)}{4 b^2 d}+\frac {\sec ^5(c+d x)}{5 b d} \]

output
ln(cos(d*x+c))/a/d-(a^2-b^2)^3*ln(a+b*sec(d*x+c))/a/b^6/d+(a^4-3*a^2*b^2+3 
*b^4)*sec(d*x+c)/b^5/d-1/2*a*(a^2-3*b^2)*sec(d*x+c)^2/b^4/d+1/3*(a^2-3*b^2 
)*sec(d*x+c)^3/b^3/d-1/4*a*sec(d*x+c)^4/b^2/d+1/5*sec(d*x+c)^5/b/d
 
3.3.87.2 Mathematica [A] (verified)

Time = 6.23 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.92 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {-\frac {b^6 \log (\cos (c+d x))}{a}+\frac {\left (a^2-b^2\right )^3 \log (a+b \sec (c+d x))}{a}-b \left (a^4-3 a^2 b^2+3 b^4\right ) \sec (c+d x)+\frac {1}{2} a b^2 \left (a^2-3 b^2\right ) \sec ^2(c+d x)-\frac {1}{3} b^3 \left (a^2-3 b^2\right ) \sec ^3(c+d x)+\frac {1}{4} a b^4 \sec ^4(c+d x)-\frac {1}{5} b^5 \sec ^5(c+d x)}{b^6 d} \]

input
Integrate[Tan[c + d*x]^7/(a + b*Sec[c + d*x]),x]
 
output
-((-((b^6*Log[Cos[c + d*x]])/a) + ((a^2 - b^2)^3*Log[a + b*Sec[c + d*x]])/ 
a - b*(a^4 - 3*a^2*b^2 + 3*b^4)*Sec[c + d*x] + (a*b^2*(a^2 - 3*b^2)*Sec[c 
+ d*x]^2)/2 - (b^3*(a^2 - 3*b^2)*Sec[c + d*x]^3)/3 + (a*b^4*Sec[c + d*x]^4 
)/4 - (b^5*Sec[c + d*x]^5)/5)/(b^6*d))
 
3.3.87.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 25, 4373, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\cot \left (c+d x+\frac {\pi }{2}\right )^7}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^7}{a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )}dx\)

\(\Big \downarrow \) 4373

\(\displaystyle -\frac {\int \frac {\cos (c+d x) \left (b^2-b^2 \sec ^2(c+d x)\right )^3}{b (a+b \sec (c+d x))}d(b \sec (c+d x))}{b^6 d}\)

\(\Big \downarrow \) 522

\(\displaystyle -\frac {\int \left (\frac {\cos (c+d x) b^5}{a}-\sec ^4(c+d x) b^4+a \sec ^3(c+d x) b^3-\left (a^2-3 b^2\right ) \sec ^2(c+d x) b^2+a \left (a^2-3 b^2\right ) \sec (c+d x) b-a^4 \left (\frac {3 \left (b^2-a^2\right ) b^2}{a^4}+1\right )+\frac {\left (a^2-b^2\right )^3}{a (a+b \sec (c+d x))}\right )d(b \sec (c+d x))}{b^6 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\frac {1}{2} a b^2 \left (a^2-3 b^2\right ) \sec ^2(c+d x)+\frac {\left (a^2-b^2\right )^3 \log (a+b \sec (c+d x))}{a}-\frac {1}{3} b^3 \left (a^2-3 b^2\right ) \sec ^3(c+d x)-b \left (a^4-3 a^2 b^2+3 b^4\right ) \sec (c+d x)+\frac {b^6 \log (b \sec (c+d x))}{a}+\frac {1}{4} a b^4 \sec ^4(c+d x)-\frac {1}{5} b^5 \sec ^5(c+d x)}{b^6 d}\)

input
Int[Tan[c + d*x]^7/(a + b*Sec[c + d*x]),x]
 
output
-(((b^6*Log[b*Sec[c + d*x]])/a + ((a^2 - b^2)^3*Log[a + b*Sec[c + d*x]])/a 
 - b*(a^4 - 3*a^2*b^2 + 3*b^4)*Sec[c + d*x] + (a*b^2*(a^2 - 3*b^2)*Sec[c + 
 d*x]^2)/2 - (b^3*(a^2 - 3*b^2)*Sec[c + d*x]^3)/3 + (a*b^4*Sec[c + d*x]^4) 
/4 - (b^5*Sec[c + d*x]^5)/5)/(b^6*d))
 

3.3.87.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4373
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1))   Subst[Int[(b^2 - x^ 
2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, 
 d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
 
3.3.87.4 Maple [A] (verified)

Time = 1.68 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {-\frac {a}{4 b^{2} \cos \left (d x +c \right )^{4}}-\frac {-a^{2}+3 b^{2}}{3 b^{3} \cos \left (d x +c \right )^{3}}-\frac {-a^{4}+3 a^{2} b^{2}-3 b^{4}}{b^{5} \cos \left (d x +c \right )}-\frac {\left (a^{2}-3 b^{2}\right ) a}{2 b^{4} \cos \left (d x +c \right )^{2}}+\frac {\left (a^{4}-3 a^{2} b^{2}+3 b^{4}\right ) a \ln \left (\cos \left (d x +c \right )\right )}{b^{6}}+\frac {1}{5 b \cos \left (d x +c \right )^{5}}+\frac {\left (-a^{6}+3 a^{4} b^{2}-3 a^{2} b^{4}+b^{6}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{6} a}}{d}\) \(184\)
default \(\frac {-\frac {a}{4 b^{2} \cos \left (d x +c \right )^{4}}-\frac {-a^{2}+3 b^{2}}{3 b^{3} \cos \left (d x +c \right )^{3}}-\frac {-a^{4}+3 a^{2} b^{2}-3 b^{4}}{b^{5} \cos \left (d x +c \right )}-\frac {\left (a^{2}-3 b^{2}\right ) a}{2 b^{4} \cos \left (d x +c \right )^{2}}+\frac {\left (a^{4}-3 a^{2} b^{2}+3 b^{4}\right ) a \ln \left (\cos \left (d x +c \right )\right )}{b^{6}}+\frac {1}{5 b \cos \left (d x +c \right )^{5}}+\frac {\left (-a^{6}+3 a^{4} b^{2}-3 a^{2} b^{4}+b^{6}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{6} a}}{d}\) \(184\)
risch \(-\frac {i x}{a}-\frac {2 i c}{a d}+\frac {2 a^{4} {\mathrm e}^{9 i \left (d x +c \right )}-6 a^{2} b^{2} {\mathrm e}^{9 i \left (d x +c \right )}+6 b^{4} {\mathrm e}^{9 i \left (d x +c \right )}-2 a^{3} b \,{\mathrm e}^{8 i \left (d x +c \right )}+6 a \,b^{3} {\mathrm e}^{8 i \left (d x +c \right )}+8 a^{4} {\mathrm e}^{7 i \left (d x +c \right )}-\frac {64 a^{2} b^{2} {\mathrm e}^{7 i \left (d x +c \right )}}{3}+16 b^{4} {\mathrm e}^{7 i \left (d x +c \right )}-6 a^{3} b \,{\mathrm e}^{6 i \left (d x +c \right )}+14 a \,b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+12 a^{4} {\mathrm e}^{5 i \left (d x +c \right )}-\frac {92 a^{2} b^{2} {\mathrm e}^{5 i \left (d x +c \right )}}{3}+\frac {132 b^{4} {\mathrm e}^{5 i \left (d x +c \right )}}{5}-6 a^{3} b \,{\mathrm e}^{4 i \left (d x +c \right )}+14 a \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+8 a^{4} {\mathrm e}^{3 i \left (d x +c \right )}-\frac {64 a^{2} b^{2} {\mathrm e}^{3 i \left (d x +c \right )}}{3}+16 b^{4} {\mathrm e}^{3 i \left (d x +c \right )}-2 a^{3} b \,{\mathrm e}^{2 i \left (d x +c \right )}+6 a \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+2 a^{4} {\mathrm e}^{i \left (d x +c \right )}-6 a^{2} b^{2} {\mathrm e}^{i \left (d x +c \right )}+6 b^{4} {\mathrm e}^{i \left (d x +c \right )}}{d \,b^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{6} d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{4} d}+\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{2} d}-\frac {a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{6} d}+\frac {3 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{4} d}-\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{2} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a d}\) \(598\)

input
int(tan(d*x+c)^7/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(-1/4/b^2*a/cos(d*x+c)^4-1/3*(-a^2+3*b^2)/b^3/cos(d*x+c)^3-(-a^4+3*a^2 
*b^2-3*b^4)/b^5/cos(d*x+c)-1/2*(a^2-3*b^2)/b^4*a/cos(d*x+c)^2+(a^4-3*a^2*b 
^2+3*b^4)/b^6*a*ln(cos(d*x+c))+1/5/b/cos(d*x+c)^5+(-a^6+3*a^4*b^2-3*a^2*b^ 
4+b^6)/b^6/a*ln(b+a*cos(d*x+c)))
 
3.3.87.5 Fricas [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.21 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {15 \, a^{2} b^{4} \cos \left (d x + c\right ) + 60 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{5} \log \left (a \cos \left (d x + c\right ) + b\right ) - 60 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 12 \, a b^{5} - 60 \, {\left (a^{5} b - 3 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{4} + 30 \, {\left (a^{4} b^{2} - 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} - 20 \, {\left (a^{3} b^{3} - 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{2}}{60 \, a b^{6} d \cos \left (d x + c\right )^{5}} \]

input
integrate(tan(d*x+c)^7/(a+b*sec(d*x+c)),x, algorithm="fricas")
 
output
-1/60*(15*a^2*b^4*cos(d*x + c) + 60*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*co 
s(d*x + c)^5*log(a*cos(d*x + c) + b) - 60*(a^6 - 3*a^4*b^2 + 3*a^2*b^4)*co 
s(d*x + c)^5*log(-cos(d*x + c)) - 12*a*b^5 - 60*(a^5*b - 3*a^3*b^3 + 3*a*b 
^5)*cos(d*x + c)^4 + 30*(a^4*b^2 - 3*a^2*b^4)*cos(d*x + c)^3 - 20*(a^3*b^3 
 - 3*a*b^5)*cos(d*x + c)^2)/(a*b^6*d*cos(d*x + c)^5)
 
3.3.87.6 Sympy [F]

\[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\tan ^{7}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]

input
integrate(tan(d*x+c)**7/(a+b*sec(d*x+c)),x)
 
output
Integral(tan(c + d*x)**7/(a + b*sec(c + d*x)), x)
 
3.3.87.7 Maxima [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.08 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\frac {60 \, {\left (a^{5} - 3 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \log \left (\cos \left (d x + c\right )\right )}{b^{6}} - \frac {60 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a b^{6}} - \frac {15 \, a b^{3} \cos \left (d x + c\right ) - 60 \, {\left (a^{4} - 3 \, a^{2} b^{2} + 3 \, b^{4}\right )} \cos \left (d x + c\right )^{4} - 12 \, b^{4} + 30 \, {\left (a^{3} b - 3 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} - 20 \, {\left (a^{2} b^{2} - 3 \, b^{4}\right )} \cos \left (d x + c\right )^{2}}{b^{5} \cos \left (d x + c\right )^{5}}}{60 \, d} \]

input
integrate(tan(d*x+c)^7/(a+b*sec(d*x+c)),x, algorithm="maxima")
 
output
1/60*(60*(a^5 - 3*a^3*b^2 + 3*a*b^4)*log(cos(d*x + c))/b^6 - 60*(a^6 - 3*a 
^4*b^2 + 3*a^2*b^4 - b^6)*log(a*cos(d*x + c) + b)/(a*b^6) - (15*a*b^3*cos( 
d*x + c) - 60*(a^4 - 3*a^2*b^2 + 3*b^4)*cos(d*x + c)^4 - 12*b^4 + 30*(a^3* 
b - 3*a*b^3)*cos(d*x + c)^3 - 20*(a^2*b^2 - 3*b^4)*cos(d*x + c)^2)/(b^5*co 
s(d*x + c)^5))/d
 
3.3.87.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1052 vs. \(2 (162) = 324\).

Time = 3.41 (sec) , antiderivative size = 1052, normalized size of antiderivative = 6.19 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]

input
integrate(tan(d*x+c)^7/(a+b*sec(d*x+c)),x, algorithm="giac")
 
output
-1/60*(30*(a^5 - 3*a^3*b^2 + 3*a*b^4)*log(abs(a + b - 2*b*(cos(d*x + c) - 
1)/(cos(d*x + c) + 1) - a*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + b*(c 
os(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2))/b^6 - 60*(a^5 - 3*a^3*b^2 + 3*a* 
b^4)*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1))/b^6 - 30*(a^6 - 
3*a^4*b^2 + 3*a^2*b^4 - 2*b^6)*log(abs(2*b + 2*a*(cos(d*x + c) - 1)/(cos(d 
*x + c) + 1) - 2*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 2*abs(a))/abs(2 
*b + 2*a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 2*b*(cos(d*x + c) - 1)/(c 
os(d*x + c) + 1) + 2*abs(a)))/(b^6*abs(a)) + (137*a^5 - 120*a^4*b - 411*a^ 
3*b^2 + 320*a^2*b^3 + 411*a*b^4 - 264*b^5 + 685*a^5*(cos(d*x + c) - 1)/(co 
s(d*x + c) + 1) - 480*a^4*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 2175*a 
^3*b^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1360*a^2*b^3*(cos(d*x + c) 
- 1)/(cos(d*x + c) + 1) + 2295*a*b^4*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) 
 - 1200*b^5*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1370*a^5*(cos(d*x + c) 
 - 1)^2/(cos(d*x + c) + 1)^2 - 720*a^4*b*(cos(d*x + c) - 1)^2/(cos(d*x + c 
) + 1)^2 - 4470*a^3*b^2*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 2000*a 
^2*b^3*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 5070*a*b^4*(cos(d*x + c 
) - 1)^2/(cos(d*x + c) + 1)^2 - 1920*b^5*(cos(d*x + c) - 1)^2/(cos(d*x + c 
) + 1)^2 + 1370*a^5*(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3 - 480*a^4*b* 
(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3 - 4470*a^3*b^2*(cos(d*x + c) - 1 
)^3/(cos(d*x + c) + 1)^3 + 1200*a^2*b^3*(cos(d*x + c) - 1)^3/(cos(d*x +...
 
3.3.87.9 Mupad [B] (verification not implemented)

Time = 15.60 (sec) , antiderivative size = 395, normalized size of antiderivative = 2.32 \[ \int \frac {\tan ^7(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )\,\left (a^4-3\,a^2\,b^2+3\,b^4\right )}{b^6\,d}-\frac {\frac {2\,\left (15\,a^4-40\,a^2\,b^2+33\,b^4\right )}{15\,b^5}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (a^4+a^3\,b-2\,a^2\,b^2-2\,a\,b^3+b^4\right )}{b^5}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,a^4+3\,a^3\,b-10\,a^2\,b^2-8\,a\,b^3+6\,b^4\right )}{b^5}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a^4+3\,a^3\,b-34\,a^2\,b^2-6\,a\,b^3+30\,b^4\right )}{3\,b^5}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (18\,a^4+9\,a^3\,b-50\,a^2\,b^2-24\,a\,b^3+48\,b^4\right )}{3\,b^5}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a\,d}-\frac {\ln \left (a+b-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )\,{\left (a^2-b^2\right )}^3}{a\,b^6\,d} \]

input
int(tan(c + d*x)^7/(a + b/cos(c + d*x)),x)
 
output
(a*log(tan(c/2 + (d*x)/2)^2 - 1)*(a^4 + 3*b^4 - 3*a^2*b^2))/(b^6*d) - ((2* 
(15*a^4 + 33*b^4 - 40*a^2*b^2))/(15*b^5) + (2*tan(c/2 + (d*x)/2)^8*(a^3*b 
- 2*a*b^3 + a^4 + b^4 - 2*a^2*b^2))/b^5 - (2*tan(c/2 + (d*x)/2)^6*(3*a^3*b 
 - 8*a*b^3 + 4*a^4 + 6*b^4 - 10*a^2*b^2))/b^5 - (2*tan(c/2 + (d*x)/2)^2*(3 
*a^3*b - 6*a*b^3 + 12*a^4 + 30*b^4 - 34*a^2*b^2))/(3*b^5) + (2*tan(c/2 + ( 
d*x)/2)^4*(9*a^3*b - 24*a*b^3 + 18*a^4 + 48*b^4 - 50*a^2*b^2))/(3*b^5))/(d 
*(5*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2) 
^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1)) - log(tan(c/2 + 
(d*x)/2)^2 + 1)/(a*d) - (log(a + b - a*tan(c/2 + (d*x)/2)^2 + b*tan(c/2 + 
(d*x)/2)^2)*(a^2 - b^2)^3)/(a*b^6*d)